using System.Web.UI;
using System.Web.UI.HtmlControls;

namespace FluentTags
{

    public class BlockquoteTag : Tag<BlockquoteTag>
    {
        public BlockquoteTag() : base("blockquote"){}
        
        public BlockquoteTag(string text) : this()
        {
            Controls.Add(new LiteralControl(text));
        }

        public BlockquoteTag(object value) : this()
        {
            Controls.Add(new LiteralControl(SafeString(value)));
        }
        
        
        public BlockquoteTag(Control control) : this()
        {
            Controls.Add(control);
        }
        
        
        public BlockquoteTag Cite(string value)
        {   
            if(!value.StartsWith("#"))
            {
                value = ResolveUrl(value);
            }
                    
            Attributes.Add("cite", value.ToString());
            return this;
        }
        
        
        public string CiteAttribute
        {
            get
            {
                return Attributes["cite"];
            }
        }
        
        
        public BlockquoteTag<BlockquoteTag> Blockquote()
        {
            var ctrl = new BlockquoteTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag Blockquote(BlockquoteTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public BlockquoteTag<BlockquoteTag> Blockquote(string text)
        {
            var ctrl = new BlockquoteTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public BlockquoteTag<BlockquoteTag> Blockquote(Control control)
        {
            var ctrl = new BlockquoteTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public BlockquoteTag<BlockquoteTag> Blockquote(object value)
        {
            return Blockquote(SafeString(value));
        }
        
        public DivTag<BlockquoteTag> Div()
        {
            var ctrl = new DivTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag Div(DivTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public DivTag<BlockquoteTag> Div(string text)
        {
            var ctrl = new DivTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public DivTag<BlockquoteTag> Div(Control control)
        {
            var ctrl = new DivTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public DivTag<BlockquoteTag> Div(object value)
        {
            return Div(SafeString(value));
        }
        
        public H1Tag<BlockquoteTag> H1()
        {
            var ctrl = new H1Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag H1(H1Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H1Tag<BlockquoteTag> H1(string text)
        {
            var ctrl = new H1Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H1Tag<BlockquoteTag> H1(Control control)
        {
            var ctrl = new H1Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H1Tag<BlockquoteTag> H1(object value)
        {
            return H1(SafeString(value));
        }
        
        public H2Tag<BlockquoteTag> H2()
        {
            var ctrl = new H2Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag H2(H2Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H2Tag<BlockquoteTag> H2(string text)
        {
            var ctrl = new H2Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H2Tag<BlockquoteTag> H2(Control control)
        {
            var ctrl = new H2Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H2Tag<BlockquoteTag> H2(object value)
        {
            return H2(SafeString(value));
        }
        
        public H3Tag<BlockquoteTag> H3()
        {
            var ctrl = new H3Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag H3(H3Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H3Tag<BlockquoteTag> H3(string text)
        {
            var ctrl = new H3Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H3Tag<BlockquoteTag> H3(Control control)
        {
            var ctrl = new H3Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H3Tag<BlockquoteTag> H3(object value)
        {
            return H3(SafeString(value));
        }
        
        public H4Tag<BlockquoteTag> H4()
        {
            var ctrl = new H4Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag H4(H4Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H4Tag<BlockquoteTag> H4(string text)
        {
            var ctrl = new H4Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H4Tag<BlockquoteTag> H4(Control control)
        {
            var ctrl = new H4Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H4Tag<BlockquoteTag> H4(object value)
        {
            return H4(SafeString(value));
        }
        
        public H5Tag<BlockquoteTag> H5()
        {
            var ctrl = new H5Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag H5(H5Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H5Tag<BlockquoteTag> H5(string text)
        {
            var ctrl = new H5Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H5Tag<BlockquoteTag> H5(Control control)
        {
            var ctrl = new H5Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H5Tag<BlockquoteTag> H5(object value)
        {
            return H5(SafeString(value));
        }
        
        public H6Tag<BlockquoteTag> H6()
        {
            var ctrl = new H6Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag H6(H6Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H6Tag<BlockquoteTag> H6(string text)
        {
            var ctrl = new H6Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H6Tag<BlockquoteTag> H6(Control control)
        {
            var ctrl = new H6Tag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H6Tag<BlockquoteTag> H6(object value)
        {
            return H6(SafeString(value));
        }
        
        public HRTag<BlockquoteTag> HR()
        {
            var ctrl = new HRTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag HR(HRTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public OLTag<BlockquoteTag> OL()
        {
            var ctrl = new OLTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag OL(OLTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<BlockquoteTag> P()
        {
            var ctrl = new PTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag P(PTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<BlockquoteTag> P(string text)
        {
            var ctrl = new PTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PTag<BlockquoteTag> P(Control control)
        {
            var ctrl = new PTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PTag<BlockquoteTag> P(object value)
        {
            return P(SafeString(value));
        }
        
        public PreTag<BlockquoteTag> Pre()
        {
            var ctrl = new PreTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag Pre(PreTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PreTag<BlockquoteTag> Pre(string text)
        {
            var ctrl = new PreTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            LiteralControl lc = new LiteralControl(text);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PreTag<BlockquoteTag> Pre(Control control)
        {
            var ctrl = new PreTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PreTag<BlockquoteTag> Pre(object value)
        {
            return Pre(SafeString(value));
        }
        
        public TableTag<BlockquoteTag> Table()
        {
            var ctrl = new TableTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag Table(TableTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ULTag<BlockquoteTag> UL()
        {
            var ctrl = new ULTag<BlockquoteTag>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag UL(ULTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        
        public BlockquoteTag Text(string text)
        {
            Controls.Add(new LiteralControl(text));
            return this;
        }

        public BlockquoteTag Text(object value)
        {
            Controls.Add(new LiteralControl(SafeString(value)));
            return this;
        }
        
    }

    public class BlockquoteTag<ParentType> : ChildTag<BlockquoteTag<ParentType>, ParentType>
        where ParentType : HtmlGenericControl
    {
        public BlockquoteTag(ParentType parent) : base("blockquote", parent) { }

        
        public BlockquoteTag<ParentType> Cite(string value)
        {   
            if(!value.StartsWith("#"))
            {
                value = ResolveUrl(value);
            }
                    
            Attributes.Add("cite", value.ToString());
            return this;
        }
        
        
        public string CiteAttribute
        {
            get
            {
                return Attributes["cite"];
            }
        }
        
        
        public BlockquoteTag<BlockquoteTag<ParentType>> Blockquote()
        {
            var ctrl = new BlockquoteTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> Blockquote(BlockquoteTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public BlockquoteTag<BlockquoteTag<ParentType>> Blockquote(string text)
        {
            var ctrl = new BlockquoteTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public BlockquoteTag<BlockquoteTag<ParentType>> Blockquote(Control control)
        {
            var ctrl = new BlockquoteTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public BlockquoteTag<BlockquoteTag<ParentType>> Blockquote(object value)
        {
            var ctrl = new BlockquoteTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public DivTag<BlockquoteTag<ParentType>> Div()
        {
            var ctrl = new DivTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> Div(DivTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public DivTag<BlockquoteTag<ParentType>> Div(string text)
        {
            var ctrl = new DivTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public DivTag<BlockquoteTag<ParentType>> Div(Control control)
        {
            var ctrl = new DivTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public DivTag<BlockquoteTag<ParentType>> Div(object value)
        {
            var ctrl = new DivTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H1Tag<BlockquoteTag<ParentType>> H1()
        {
            var ctrl = new H1Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> H1(H1Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H1Tag<BlockquoteTag<ParentType>> H1(string text)
        {
            var ctrl = new H1Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H1Tag<BlockquoteTag<ParentType>> H1(Control control)
        {
            var ctrl = new H1Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H1Tag<BlockquoteTag<ParentType>> H1(object value)
        {
            var ctrl = new H1Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H2Tag<BlockquoteTag<ParentType>> H2()
        {
            var ctrl = new H2Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> H2(H2Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H2Tag<BlockquoteTag<ParentType>> H2(string text)
        {
            var ctrl = new H2Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H2Tag<BlockquoteTag<ParentType>> H2(Control control)
        {
            var ctrl = new H2Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H2Tag<BlockquoteTag<ParentType>> H2(object value)
        {
            var ctrl = new H2Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H3Tag<BlockquoteTag<ParentType>> H3()
        {
            var ctrl = new H3Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> H3(H3Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H3Tag<BlockquoteTag<ParentType>> H3(string text)
        {
            var ctrl = new H3Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H3Tag<BlockquoteTag<ParentType>> H3(Control control)
        {
            var ctrl = new H3Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H3Tag<BlockquoteTag<ParentType>> H3(object value)
        {
            var ctrl = new H3Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H4Tag<BlockquoteTag<ParentType>> H4()
        {
            var ctrl = new H4Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> H4(H4Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H4Tag<BlockquoteTag<ParentType>> H4(string text)
        {
            var ctrl = new H4Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H4Tag<BlockquoteTag<ParentType>> H4(Control control)
        {
            var ctrl = new H4Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H4Tag<BlockquoteTag<ParentType>> H4(object value)
        {
            var ctrl = new H4Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H5Tag<BlockquoteTag<ParentType>> H5()
        {
            var ctrl = new H5Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> H5(H5Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H5Tag<BlockquoteTag<ParentType>> H5(string text)
        {
            var ctrl = new H5Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H5Tag<BlockquoteTag<ParentType>> H5(Control control)
        {
            var ctrl = new H5Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H5Tag<BlockquoteTag<ParentType>> H5(object value)
        {
            var ctrl = new H5Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public H6Tag<BlockquoteTag<ParentType>> H6()
        {
            var ctrl = new H6Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> H6(H6Tag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public H6Tag<BlockquoteTag<ParentType>> H6(string text)
        {
            var ctrl = new H6Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public H6Tag<BlockquoteTag<ParentType>> H6(Control control)
        {
            var ctrl = new H6Tag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public H6Tag<BlockquoteTag<ParentType>> H6(object value)
        {
            var ctrl = new H6Tag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public HRTag<BlockquoteTag<ParentType>> HR()
        {
            var ctrl = new HRTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> HR(HRTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public OLTag<BlockquoteTag<ParentType>> OL()
        {
            var ctrl = new OLTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> OL(OLTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<BlockquoteTag<ParentType>> P()
        {
            var ctrl = new PTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> P(PTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PTag<BlockquoteTag<ParentType>> P(string text)
        {
            var ctrl = new PTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PTag<BlockquoteTag<ParentType>> P(Control control)
        {
            var ctrl = new PTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PTag<BlockquoteTag<ParentType>> P(object value)
        {
            var ctrl = new PTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public PreTag<BlockquoteTag<ParentType>> Pre()
        {
            var ctrl = new PreTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> Pre(PreTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public PreTag<BlockquoteTag<ParentType>> Pre(string text)
        {
            var ctrl = new PreTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(text);
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            
            return ctrl;
        }

        public PreTag<BlockquoteTag<ParentType>> Pre(Control control)
        {
            var ctrl = new PreTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            ctrl.Controls.Add(control);
            
            return ctrl;
        }

        public PreTag<BlockquoteTag<ParentType>> Pre(object value)
        {
            var ctrl = new PreTag<BlockquoteTag<ParentType>>(this);
            LiteralControl lc = new LiteralControl(SafeString(value));
            Controls.Add(ctrl);
            ctrl.Controls.Add(lc);
            return ctrl;
        }
        
        public TableTag<BlockquoteTag<ParentType>> Table()
        {
            var ctrl = new TableTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> Table(TableTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        public ULTag<BlockquoteTag<ParentType>> UL()
        {
            var ctrl = new ULTag<BlockquoteTag<ParentType>>(this);
            Controls.Add(ctrl);
            return ctrl;
        }

        public BlockquoteTag<ParentType> UL(ULTag child)
        {
            Controls.Add(child);
            return this;
        }
        
        
        public BlockquoteTag<ParentType> Text(string text)
        {
            Controls.Add(new LiteralControl(text));
            return this;
        }
        
        public BlockquoteTag<ParentType> Text(object value)
        {
            Controls.Add(new LiteralControl(SafeString(value)));
            return this;
        }
        
        
    }
}